package org.learn.intermediate.homework;

public class Manager extends Employee{
    private double bonus;

    public Manager(String name, double daySal, int workDays, double grad, double bonus) {
        super(name, daySal, workDays, grad);

    }
    //重写父类打印方法
    public void printSal(){
        //工资计算方法不一样所以可以重写
        System.out.println("经理" + getName() + "工资是"
                + (bonus + getDaySal() * getWorkDays() * getGrad() ));

    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
}
